package com.huawei;
import java.util.*;
/**
 * Created by Z-hong on 2024/7/22.
 */

public class HJ59 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str=scanner.next();
        char[] charArray = str.toCharArray();
        Map<Character,Integer> map=new HashMap<>();
        for (int i = 0; i < charArray.length; i++) {
            if (map.containsKey(charArray[i])){
                map.put(charArray[i],map.get(charArray[i])+1);
            }else {
                map.put(charArray[i],1);
            }
        }
        String res="-1";
        for (int i = 0; i < charArray.length; i++) {
            if (map.get(charArray[i])==1){
                res=charArray[i]+"";
                break;
            }
        }
        System.out.println(res);
    }
}
